import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import router from './router'
import 'lib-flexible/flexible.js'
import _g from "./_globals"
import axios from 'axios'
import htmlpanel from '../src/components/htmlpanel';
import api from './api'; // 导入api接口
import './assets/common/css/style.css';

import echarts from "echarts";
Vue.prototype.$echarts = echarts;

import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'

Vue.use(Viewer);

Vue.prototype.$api = api; // 将api挂载到vue的原型上

Vue.config.productionTip = false;
Vue.use(ElementUI);
Vue.component('v-html-panel', htmlpanel);

new Vue({
    el: "#app",
    router,
    // store,
    render: h => h(App),
})

axios.defaults.baseURL = process.env.VUE_APP_URL;
Vue.prototype.csUrl = process.env.VUE_APP_URL
Vue.prototype.aUrl = process.env.VUE_APP_aURL
// Vue.prototype.aUrl = 'http://139.196.137.184:8000'

// axios.defaults.baseURL = 'http://127.0.0.1:5000/'
// Vue.prototype.csUrl = 'http://127.0.0.1:5000/'
// Vue.prototype.aUrl = 'http://127.0.0.1:8000/'


// axios.defaults.withCredentials = true //让ajax携带cookies
// Vue.prototype.$http = axios;
